package com.xzj.spring.process;

/**
 * @ProjectName: SpringDemo
 * @Package: com.xzj.spring.process
 * @ClassName: XZJBeanPostProcessorCopy
 * @Author: xzj
 * @Description:
 * @Date: 2022/7/12 10:12
 * @Version: 1.0
 */
//@Component
public class XZJBeanPostProcessorCopy implements BeanPostProcessor {

    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws RuntimeException {
        System.out.println(String.format("BeanName:%s, Bean:%s, postProcessBeforeInitialization2",beanName,bean));
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws RuntimeException {
        //是否需要动态代理
        System.out.println(String.format("BeanName:%s, Bean:%s, postProcessAfterInitialization2",beanName,bean));
        return bean;
    }
}
